import request from "@/utils/http";


export const getList = () => {
    return request({
        url: '/api/blade-basic/app/carInfo/list?current=1&size=-1',
    })
}
export const getdcrList = (row) => {
    const id=row.moduleId?row.moduleId:row.id
    const label=row.moduleId?'applyCarId_equal':'carId_equal'
    return request({
        url: `/api/blade-basic/app/dispatchCarRecord/page?current=1&size=-1&${label}=${id}`,
    })
}

export const getDetail = (id) => {
    return request({
        url: `/api/blade-basic/app/carInfo/detail?id=${id}`,

    })
}

export const remove = (ids) => {
    return request({
        url: `/api/blade-basic/app/carInfo/remove?ids=${ids}`,
        method: 'post',
    })
}

export const add = (row) => {
    return request({
        url: '/api/blade-basic/app/carInfo/submit',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/blade-basic/app/carInfo/submit',
        method: 'post',
        data: row
    })
}
export const changeStatus = (row) => {
    return request({
        url: `/api/blade-basic/app/carInfo/changeStatus?id=${row.id}`,
        method: 'post',
        data: row
    })
}
export const deptList = () => {
    return request({
        url: '/api/blade-system/dept/list?size=-1',
    })
}


export const Upload = (data) => {
    return request({
        url: '/api/blade-basic/app/dispatchCarRecord/update',
        method: 'post',
        data,
    })
}